package me.itsoo.artemis.framework.core.render;

/**
 * HighlightRenders
 *
 * @author zxy
 * @version 0.0.1
 * @since 2023/5/1
 */
public class HighlightRenders {

    public static final Render SQL_HIGHLIGHT_RENDER = new SqlHighlightRender();

    public static final Render LINE_NUMBER_RENDER = new LineNumberRender();

    private final Render r;

    private HighlightRenders(Render r) {
        this.r = r;
    }

    /**
     * 创建高亮命令对象
     *
     * @param r Render
     * @return HighlightRenders
     */
    public static HighlightRenders create(Render r) {
        return new HighlightRenders(r);
    }

    /**
     * 高亮渲染
     *
     * @param content String
     * @return String
     */
    public String rend(String content) {
        return r.doRend(content);
    }
}
